/*
 * @Author: anxia.ack anchenkai@come-future.com
 * @Date: 2025-04-11 15:29:33
 * @LastEditors: anxia.ack anchenkai@come-future.com
 * @LastEditTime: 2025-04-11 15:30:56
 * @FilePath: /free-learning/src/utils/random-sentence/index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export interface SentenceType {
  quote: string;
  author: string;
  source: string;
}
import data from "./data.json";
const randomSentence = (): SentenceType => {
  const randomIndex = Math.floor(Math.random() * data.length);
  return data[randomIndex];
};

export default randomSentence;
